package com.youmu.maven.emall.support;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

@Component
public class PostInitializationListener implements
		ApplicationListener<ContextRefreshedEvent> {

	Log log = LogFactory.getLog(PostInitializationListener.class);

	@Override
	public void onApplicationEvent(ContextRefreshedEvent event) {
		// TODO Auto-generated method stub
		if (event.getApplicationContext().getParent() == null) {
			log.info("init");
			init();
		}
	}

	private void init() {
		initPermission();
	}

	private void initPermission() {

	}

}
